<%@page import="java.util.TreeMap"%>
<%@page import="entities.User"%>
<%
User user = (User) request.getAttribute("user");
TreeMap check = (TreeMap) request.getAttribute("check");
String success = (String) request.getAttribute("success");
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp" />

	<script type="text/javascript" src="/js/verify_domain.js"></script>
	
                <div id="leftSideContent">
                	<div class="profilePage clearafter">
                        <div class="left dashboard">
                            <jsp:include page="/elements/menu_profile.jsp" />
                        </div>
                        <div class="right profileContent">
                        	<% if (check.size() > 0) { %>
                        	<div class="message-error">
		                    	<span class="closeMessage"></span>
		                    	<ul>
		                    		<% if (check.get("name") != null) { %>
									<li> - <%=check.get("name")%></li>
									<% } %>
		                    		<% if (check.get("captcha") != null) { %>
										<li> - <%=check.get("captcha")%></li>
									<% } %>
		                    	</ul>
		                    </div>
		                    <% } %>
		                    <% if (success != null) { %>
		                    <div class="message-success">
		                    	<span class="closeMessage"></span>
		                    	<p><%=success %></p>
		                    </div>
		                    <% } %>
		                    
                        	<section class="block">
								<div class="blockContent">
									<h3 class="title">Change Profile</h3>
									<form method="post" action="">
										<label>
										    <span>Email</span>
										    
										    <input value="<%=user.getUsername()%>" readonly="readonly">
										</label>
										<label>
										    <span>Display Name</span>
										    
											<input type="text" name="name" value="<%=user.getName()%>" />
										    </label>
										    <label>
										        <span>Gender</span>
										        <select name="gender">
										        	<option value="0">Male</option>
										        	<option value="1">FeMale</option>
										        </select>
										    </label>
										    <div class="captcha">
										    	<span>Input captchar</span>
												<script>
										        	var RecaptchaOptions = { theme : 'red' };
										  		</script>
												<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
                                            </div>
                                            <br />
										    <div class="content-center">
										    	<button type="submit" class="buttonStyle">Update</button>
										    </div>
										</form>
								</div>
								<div class="blockShadow"></div>
							</section>
                        </div>
                    </div>
                </div>
                
                <!-- right content -->
                <jsp:include page="/elements/right.jsp" />
                <!-- end right content -->
                
<jsp:include page="/layouts/footer.jsp" />